<?php
	if (!empty($categories)) {?>
	<h3><?=__('categories.index.title') ?></h3>

	<table>
		<tr>
			<th><?= __('categories.name') ?></th>
			<th><?= __('categories.description') ?></th>
			<th><?= __('categories.enable') ?></th>
			<th><?= __('categories.doc') ?></th>
			<th><?= __('categories.dom') ?></th>
			<th><?= __('categories.viewLink') ?></th>
		</tr>

		<?php
		foreach($categories as $category) { ?>

		<tr>
			<td><?= $category['Category']['name']; ?></td>
			<td><?= $category['Category']['description']; ?></td>
			<td><?= $category['Category']['enable']; ?></td>
			<td><?= date('d-m-Y', strtotime($category['Category']['created'])); ?></td>
			<td><?= date('d-m-Y', strtotime($category['Category']['modified'])); ?></td>
			<td><a href="/categories/view/<?=$category['Category']['id']; ?>"><?=__('categories.viewLink') ?></a></td>
		</tr>
		<?php }?>
	</table>

<?php } else {?>

	<h3><?=__('categories.index.noCategory')?></h3>
<?php } ?>